# -*- coding: utf-8 -*-
# created on 2016/9/28

from mathsolver.functions.base import *


class YuanXinUpdate(BaseFunction):
    def solver(self, *args):
        point = args[1].sympify()
        if isinstance(args[0], BaseVariable):
            name = args[0].value
        else:
            name = args[0].name
        self.output.append(BaseYuan({"name": name, "value": point}))
        return self


class YuanUpdate(BaseFunction):
    def solver(self, *args):
        self.output.extend(args)
        return self
